package com.feishu.service.impl;


import com.feishu.base.dto.entity.ExecutionTypeDO;
import com.feishu.mapper.RpcSettingMapper;
import com.feishu.service.RpcSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class RpcSettingServiceImpl implements RpcSettingService {
    @Autowired
    RpcSettingMapper rpcSettingMapper;

    @Override
    public ExecutionTypeDO getExecutionType(String code, String k3cloud) {
        return rpcSettingMapper.getExecutionType(code, k3cloud);
    }


    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Override
    public int saveLogs(String id, String plm_data, String erp_result, String plm_setting_object,
                                              String plm_setting_code, String plm_exception) {
        return rpcSettingMapper.saveLogs(id, plm_data, erp_result, plm_setting_object, plm_setting_code, plm_exception);
    }
}
